<template>
<div>
  <el-button @click="changeData()" type="danger">我要修改VueX的值</el-button>
</div>
</template>

<script>
export default {
  name: "01VueXState",
  mounted() {
    console.log(this.$store.state.acceptData)
  },
  methods:{
    changeData(){
      this.$store.commit('changeNum',1)
      console.log(this.$store.state.acceptData,'变了吗')
    }
  }
}
</script>

<style scoped>

</style>
